package com.jiazhong.boot.ioc.mybatis.controller;

import com.jiazhong.boot.commons.util.JsonResult;
import com.jiazhong.boot.ioc.mybatis.service.EmpService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/emp")
public class EmpController {
    @Resource
    private EmpService empService;

    @GetMapping
    public JsonResult find() {
        return empService.findAll();
    }
}
